SPI to I2C Click example.
Description
This example demonstrates the use of SPI to I2C Click board by reading the manufacturer ID of a 3D Hall 11 Click board connected to the I2C port and controlling the GPIO pins.
The demo application is composed of two sections :
Application Init
Initializes the driver and performs the Click default config which enables the device and sets the GPIO pins 0-2 as push-pull output and others as input. Then sets the I2C clock to 99KHz, I2C address to 127 and disables I2C timeout. After that, reads and displays the chip firmware version.
Application Task
Reads the manufacturer ID of a 3D Hall 11 Click board connected to the I2C port, toggles the output pins and displays the GPIO port state. The results will be displayed on the USB UART approximately once per second.
- Author
- Stefan Filipovic